// example if the container height is being animated, we want to
// avoid animating the children allocations to make sure they
// don't "lag behind" the other animation).
- if (layoutChanged) {
+ if (layoutChanged && !Main.overview.animationInProgress) {
const transition = animateAllocation(child, childBox);
if (transition) {
windowInfo.currentTransition = transition;
}
zoomToOverview() {
+ const animate =
+ this.metaWorkspace === null || this.metaWorkspace.active;
+
+ const adj = this.layout_manager.stateAdjustment;
+ adj.value = 0;
+ adj.ease(1, {
+ duration: animate ? Overview.ANIMATION_TIME : 0,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ });
}
zoomFromOverview() {
if (this.metaWorkspace !== null && !this.metaWorkspace.active)
return;
- // Position and scale the windows.
- for (let i = 0; i < this._windows.length; i++)
- this._zoomWindowFromOverview(i);
- }
-
- _zoomWindowFromOverview(index) {
- let clone = this._windows[index];
- clone.hideOverlay(false);
-
- if (clone.metaWindow.showing_on_its_workspace()) {
- clone.ease({
- opacity: 255,
- duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- });
- } else {
- // The window is hidden, make it shrink and fade it out
- clone.ease({
- opacity: 0,
- duration: Overview.ANIMATION_TIME,
- mode: Clutter.AnimationMode.EASE_OUT_QUAD,
- });
- }
+ this.layout_manager.stateAdjustment.ease(0, {
+ duration: Overview.ANIMATION_TIME,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ });
}
_onDestroy() {
const SwipeTracker = imports.ui.swipeTracker;
const Workspace = imports.ui.workspace;
+var { ANIMATION_TIME } = imports.ui.overview;
var WORKSPACE_SWITCH_TIME = 250;
var SCROLL_TIMEOUT_TIME = 150;
animateFromOverview(fadeOnPrimary) {
for (let i = 0; i < this._workspacesViews.length; i++) {
+ const { x, y, width, height } =
+ Main.layoutManager.getWorkAreaForMonitor(i);
+ this._workspacesViews[i].ease({
+ x, y, width, height,
+ duration: ANIMATION_TIME,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ });
+
let animationType;
if (fadeOnPrimary && i == this._primaryIndex)
animationType = AnimationType.FADE;
if (!primaryView)
return;
- primaryView.set(this._actualGeometry);
+ primaryView.ease({
+ ...this._actualGeometry,
+ duration: Main.overview.animationInProgress ? ANIMATION_TIME : 0,
+ mode: Clutter.AnimationMode.EASE_OUT_QUAD,
+ });
}
_onRestacked(overview, stackIndices) {